/*
** my_strncmp.c for my_strncmp in /home/goupil_r//afs/Jour_06
** 
** Made by robin goupil
** Login   <goupil_r@epitech.net>
** 
** Started on  Mon Oct  8 11:45:42 2012 robin goupil
** Last update Wed Oct 24 17:31:14 2012 robin goupil
*/

int	my_strncmp(char *s1, char *s2, int n)
{
  int	i;

  i = 0;
  while (s1[i] == s2[i] || s2[i] == '\0' && i < n)
    {
      if (s2[i] == '\0' && i == n - 1)
	return (1);
      i = i + 1;
    }
  return (s1[i] - s2[i]);
}
